<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0032)http://localhost/news//index.php -->
<?php require 'config.php'; ?>
<HTML><HEAD><TITLE><?php print $title; ?></TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK 
href="css.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript src="jsfunc.js" 
type=text/javascript></SCRIPT>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<style type="text/css">
<!--
.style1 {font-size: 10}
-->
</style>
</HEAD>
<BODY bgcolor="#000000" text="#FFFFFF" leftMargin=9 topMargin=9>
<DIV align=center>
<TABLE width=100% height="100%" border=0 cellPadding=0 cellSpacing=0>
  <!--DWLayoutTable-->
  <TBODY>
  <TR>
    <TD width="975" height="25">&nbsp;</TD>
  </TR>
  <TR>
    <TD height="492" vAlign=top><TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
            <TBODY>
            <TR>
            <TD class=spacerTable1 vAlign=center><IMG height=1 
            src="f u s i o n  Logged in.files/spacer.gif" 
      width=1></TD></TR></TBODY>
      </TABLE>
        <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
            <TBODY>
            <TR>
              <TD vAlign=center><div align="center">
 <?php require 'config.php'; ?>
    </div></TD>
            </TR></TBODY>
        </TABLE>        <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
            <TBODY>
            <TR>
            <TD class=spacerTable3 vAlign=center><IMG height=1 
            src="f u s i o n  Logged in.files/spacer.gif" 
      width=1></TD></TR></TBODY>
        </TABLE>        <TABLE ;" 
  cellSpacing=1 
      cellPadding=2 width=100% border=0>
            <TBODY>
            <TR>
              <TD class=headBG1 vAlign=center><div align="right">
              </div></TD>
            </TR>
            <TR>
              <TD class=contentBG 

                <table width="25%" border="0.5">
            
              </table>
                <table width="100%" height="5%" border="0.5">
                    <tr>
                    </tr>
                    <tr>
                      <th scope="col"><h6>                        <?php
$email = stripslashes($_POST['email']);
$question = stripslashes($_POST['ques']);
$answer = stripslashes($_POST['answer']);
$idnumb = stripslashes($_POST['idnumb']);

$sql_email_check = mssql_query("SELECT mail_addr FROM MEMB_INFO WHERE mail_addr='$email' and fpas_ques = '$question'"); 
$email_check = mssql_num_rows($sql_email_check); 
$sql_answ_check = mssql_query("SELECT fpas_answ FROM MEMB_INFO WHERE fpas_answ = '$answer' and fpas_ques = '$question'"); 
$answ_check = mssql_num_rows($sql_answ_check); 
$sql_id_check = mssql_query("SELECT addr_deta FROM MEMB_INFO WHERE addr_deta = '$idnumb' and fpas_ques = '$question'"); 
$id_check = mssql_num_rows($sql_id_check); 

if (empty($email) || empty($question) || empty($answer) || empty($idnumb) || ($email_check <= 0) || ($answ_check <= 0) || ($id_check <= 0)) 
{
echo "Error: <br>";

if (empty($email) || empty($question) || empty($answer) || empty($idnumb)) {
    echo "Some fields were left blank. Please go back and try again.<br>";
}
	
elseif ($email_check <= 0){ 
echo "'$email' does not exist in our database and/or it's not registered on your account. Please go back and try again.<br>"; 
    } 

elseif ($answ_check <= 0){ 
echo "Your Secret Answer is wrong. Please go back and try again.<br>"; 
    } 

elseif ($id_check <= 0){ 
echo "Your ID Number is wrong. Please go back and try again.<br>"; 
    } }

else {	
$sql = mssql_query("SELECT memb__pwd from MEMB_INFO
    WHERE mail_addr = '$email'
    and fpas_ques = '$question'
    and fpas_answ = '$answer'
	and addr_deta = '$idnumb'");
echo "Your password could be retrieved successfully.<br>Password: ";
echo mssql_result($sql, 0, 0);}
?>
                      </h6></th>
                    </tr>
              </table>
          </DIV>
                </TD>
            </TR>
            <TR>
              <TD class=headBG1 vAlign=center><div align="center"><SPAN class=textLogin> </SPAN></div></TD>
            </TR></TBODY>
        </TABLE>
    </TD>
  </TR>
  </TBODY></TABLE>
</DIV></BODY></HTML>
